#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
   File Name：    custom_exception.py
   Author :       Yu-Que Z
   CreateDate：   2024/10/23 10:42
   Remark :  自定义异常类
-------------------------------------------------
"""

from apitesting.common.util.logger import log as Log


# GlobalExceptionHandler

class LenError(Exception):
    """数据长度比较异常"""

    def __init__(self, message):
        self.message = message
        Log.error(message)
        super().__init__(self.message)


class AnalysisError(Exception):
    """数据解析异常"""

    def __init__(self, message):
        self.message = message
        Log.error(message)
        super().__init__(self.message)
